1. Field of the Invention
The present invention relates to a method and an apparatus for reading and recognizing a two-dimensional code image that is input from an optical reading apparatus such as a scanner, a CCD camera, etc.
2. Description of the Related Art
In a conventional two-dimensional code reading apparatus, the two-dimensional code image that is input by an optical reading apparatus is binarized and recognition processing is performed on the binarized image (refer to FIG. 14 of patent literature 1 or FIG. 1 of patent literature 2). There is a problem such that recognition accuracy is decreased due to the influence of data distortion occurring in the case where the reading apparatus does not have a resolution higher than a predetermined value, when recognition processing is performed after the image data read by an optical apparatus is converted into binary data. For example, an isolated cell (in a two-dimensional code, a square comprising a black dot or a white dot is called a cell) surrounded by cells of different types in four or eight directions thereof is influenced by the adjacent cells in the case where the optical resolution of the reading apparatus is low or the image formed within the apparatus is out of focus and accordingly the cell is converted into an erroneous value. Such a problem becomes prominent in the case where a two-dimensional code is read using the built-in compact camera of a portable terminal as the amount of light gathered is small, since the optical apparatus is also small.
Even when recognition processing is performed without using binarization processing, the above-mentioned problem cannot be solved if a simple binarization method is used to determine cell values. Additionally, in the case where the image of a two-dimensional code to be recognized is photographed by a moving recognition apparatus with a camera, the time required for recognition processing is generally greater than the available exposure time of each image. Consequently, the functionality of the user interface is reduced as the number of images to be displayed for each unit of time decreases. In such a case, an image is photographed using the exposure control method of a still image. In order to virtually increase the sensors effective sensitivity, especially, under low light conditions, an image securing a broad gradation is obtained by performing multiple-exposure (long-shuttering) processing of an image over a plurality of frames while exceeding the reading time of the image data of one frame of the camera. This introduces the problem that an indistinct image is obtained of moving targets by performing multiple-exposure processing of the target over a plurality of frames and consequently the recognition performance is lowered.
[Patent Literature 1]
Specification of patent application No. 6-042587 (Japanese unexamined patent application publication No. 7-254037)
[Patent Literature 2]
Specification of patent application No. 8-341354 (Japanese unexamined patent application publication No. 10-187868) An isolated cell that is surrounded by cells of different types (cells having different gradation values such as white, black, etc.) in four directions or eight directions thereof is influenced by the adjacent cells in respect of a gradation value thereof in the case where the optical resolution of the apparatus is low or the apparatus cannot maintain focus. Therefore, there arises a problem such that the value of the cell cannot be precisely converted using a simple binarizing method alone.